Migrate build infrastructure from Gradle to Maven#2613
Open
ramsessanchez wants to merge 1 commit into
Open
Conversation
89d1a9e to
8a28eb6
Compare
- Add pom.xml with all dependencies, compiler settings (Java 1.8, -parameters), jar manifest (Automatic-Module-Name), javadoc, source, and GPG signing profile - Add Maven wrapper (mvnw/mvnw.cmd) replacing Gradle wrapper - Rename gradle-build.yml to maven-build.yml with Maven commands and cache - Update codeql-analysis.yml to use mvnw compile - Update ADO ci-build.yml with Maven install/deploy and settings.xml auth - Update ADO daily-ci-build.yml with Maven@4 task and network-isolated mirror - Update dependabot.yml: maven ecosystem for root, gradle kept for /android - Update .gitignore: swap Gradle entries for Maven - Update release-please-config.json: XML xpath updater for pom.xml version - Inline dependencies into android/build.gradle (remove shared gradle/dependencies.gradle) - Remove all root Gradle files and java-8/ sub-project Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8a28eb6 to
4573ad2
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s root build and CI/CD from Gradle to Maven (via pom.xml + Maven Wrapper), while keeping the Android subproject on Gradle and removing the legacy java-8/ Gradle build.
Changes:
- Introduces a root
pom.xml(Java 8 source/target,-parameters, sources/javadoc jars, signing profile) and adds Maven Wrapper scripts/config. - Updates GitHub Actions + Azure Pipelines workflows to run Maven (
./mvnw …) and adjusts artifact/test-result paths. - Removes root Gradle build infrastructure (including the
java-8/subproject) and inlines shared dependencies intoandroid/build.gradle.
Reviewed changes
Copilot reviewed 22 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle | Removes Gradle multi-project settings (Gradle build removal). |
| release-please-config.json | Switches release-please version bumping to update pom.xml via XML XPath. |
| pom.xml | Adds Maven build definition, dependencies, plugins, and signing profile. |
| mvnw | Adds Maven Wrapper (POSIX) script. |
| mvnw.cmd | Adds Maven Wrapper (Windows) script. |
| .mvn/wrapper/maven-wrapper.properties | Configures Maven distribution + wrapper JAR URLs. |
| .gitignore | Updates ignore rules for Maven (and wrapper JAR). |
| build.gradle | Removes root Gradle build definition. |
| gradle.properties | Removes root Gradle build properties. |
| gradle/dependencies.gradle | Removes shared Gradle dependency definitions. |
| gradle/wrapper/gradle-wrapper.properties | Removes Gradle wrapper configuration. |
| gradlew | Removes Gradle wrapper (POSIX) script. |
| gradlew.bat | Removes Gradle wrapper (Windows) script. |
| java-8/settings.gradle | Removes legacy Java 8 Gradle subproject settings. |
| java-8/gradle.properties | Removes legacy Java 8 Gradle subproject properties. |
| java-8/daemon-jvm.properties | Removes legacy Java 8 toolchain properties. |
| java-8/build.gradle | Removes legacy Java 8 Gradle subproject build. |
| java-8/.gitignore | Removes legacy Java 8 subproject ignore file. |
| android/build.gradle | Inlines previously shared dependency declarations into Android Gradle build. |
| .github/workflows/maven-build.yml | Updates CI workflow to build with Maven + new artifact paths. |
| .github/workflows/codeql-analysis.yml | Updates CodeQL build step to Maven. |
| .github/dependabot.yml | Switches root dependency updates to Maven; keeps Gradle updates for Android. |
| .azure-pipelines/daily-ci-build.yml | Updates daily ADO pipeline to Maven task and Maven settings/mirror configuration. |
| .azure-pipelines/ci-build.yml | Updates official ADO pipeline to Maven install/deploy/signing + staging layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18
to
+21
| "type": "xml", | ||
| "path": "pom.xml", | ||
| "xpath": "//project/version" | ||
| }, |
Comment on lines
+64
to
+67
| $props = Get-Content local.properties -Raw | ||
| $keyId = ($props | Select-String -Pattern 'signing\.keyId=(.+)').Matches.Groups[1].Value | ||
| $keyRingFile = ($props | Select-String -Pattern 'signing\.secretKeyRingFile=(.+)').Matches.Groups[1].Value | ||
| $keyPassword = ($props | Select-String -Pattern 'signing\.password=(.+)').Matches.Groups[1].Value |
| $settingsXml | Set-Content (Join-Path $settingsDir "settings.xml") -Encoding UTF8 | ||
| displayName: Configure Maven settings | ||
|
|
||
| - script: ./mvnw install -Psigning --no-transfer-progress -DmavenCentralSnapshotSuffix="" |
|
|
||
| - script: ./gradlew --no-daemon publishMavenPublicationToADORepository -PmavenCentralPublishingEnabled=true -PmavenCentralSnapshotArtifactSuffix="" | ||
| displayName: Publish to local Maven ADO for ESRP | ||
| - script: ./mvnw deploy -Psigning --no-transfer-progress -DmavenCentralSnapshotSuffix="" -DaltDeploymentRepository=ADO::default::file://$(Build.SourcesDirectory)/target/staging-deploy |
|
|
||
| <scm> | ||
| <url>https://github.com/microsoftgraph/msgraph-sdk-java</url> | ||
| <connection>scm:git:git://github.com/microsoftgraph/msgraph-sdk-java.git</connection> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the build system from Gradle to Maven while preserving all build behaviors.
Changes
New Maven build:
CI/CD pipeline updates:
Config updates:
elease-please-config.json: XML xpath updater for \pom.xml\ version
Android sub-project:
Removed:
Verification